package action.main;

import java.util.List;

import service.MainService;
import util.ObjectFactory;

import dao.BookDAO;

import entity.Product;

public class HotAction {
	//input
	private int size=4;
	//output
	private List<Product> hots;
	//injection
	private MainService mainService;
	public void setMainService(MainService mainService) {
		this.mainService = mainService;
	}
	
	public String execute()throws Exception{
		hots=mainService.findHot(size);
		return "success";
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public List<Product> getHots() {
		return hots;
	}

	public void setHots(List<Product> hots) {
		this.hots = hots;
	}
	
}
